<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
/*
	选择插件
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'one';
$return=array();
	$return['params']=$params=array();
	$params=array('type <'=>4,'hide'=>0);
	if($_RQ['title']){
		$params['title like']='%'.trim($_RQ['title']).'%';
		$return['params']['title']=$_RQ['title'];
	}
	$list=pdo_getall('core_plugins',$params,array('name','title'),'','id desc');
	if($list){
		foreach($list as $k=>&$item){
			$install = check_permission($item['name']);
			if(!$install){
				unset($list[$k]);
			}
		}
	}
	$return['list']=$list;
	$htmls=array(
			'type'=>'list',
			'tabs'=>$tabs,
			'list'=>array('data'=>'list','edit'=>false,'delall'=>false,'del_one'=>false,'list'=>array(
				array('name'=>'name','title'=>'插件标识','type'=>'string'),
				array('name'=>'title','title'=>'插件名称','type'=>'string'),
			),'action'=>array(
				array('type'=>'modal_result','name'=>'name','title'=>'进入'),
			)),
			'search_one'=>array('name'=>'title','add'=>false),
		);
	$return['htmls']=$htmls;
	exi($return);
